package com.lcredu.spring.component;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

/**
 * @author 黎长容
 * @date 2025-07-15 22:21
 */
@Component
public class UserService {
    @Autowired
    private UserDao userDao;

    public void m1() {
        userDao.hi();
    }

    /**
     * 初始化方法
     */
    @PostConstruct
    public void init(){
        System.out.println("UserService--init() 被调用...");
    }
}
